package com.hp.TrimClient;

import java.util.ArrayList;
import java.util.List;

import com.hp.TrimClient.Enums.PropertyType;

public abstract class PropertyFetchBase {
	
	private com.hp.TrimClient.Enums.StringDisplayType StringDisplayType;
	@DataMember(name="stringDisplayType")
	public com.hp.TrimClient.Enums.StringDisplayType getStringDisplayType() {
		return StringDisplayType;
	}

	public void setStringDisplayType(com.hp.TrimClient.Enums.StringDisplayType stringDisplayType) {
		StringDisplayType = stringDisplayType;
	}
	
	
	private PropertyType PropertyValue;
	@DataMember(name="propertyValue")
	public PropertyType getPropertyValue() {
		return PropertyValue;
	}

	public void setPropertyValue(PropertyType propertyValue) {
		PropertyValue = propertyValue;
	}
	
	private String[] properties;
	@DataMember(name="properties")
	public String[] getProperties() {
		return properties;
	}
	
	public void addFetchProperties(Object... args) {
		
		List<String> newProps = new ArrayList<String>();
		
		if (properties != null) {
			for (String p : properties) {
				newProps.add(p);
			}
		}
		
		for (Object p : args) {
			newProps.add(p.toString());
		}
		
		properties = newProps.toArray(new String[newProps.size()]);
	}
}
